Introduction

In this reading, you will recap some key concepts on how to set up a new project for Swift UI. As mentioned previously in the course, Apple offers different devices that operate with different input methods, like a keyboard, mouse, touch and remote control. Each of these devices has its own operating system. To create apps for the diverse devices in the Apple ecosystem, you need to use an application called  XCode, which is provided for free by Apple.  XCode is what is technically called an Integrated Development Environment, or IDE, that runs on Mac computers.

The apps you create in  XCode can use different languages, such as Swift or the old Objective-C, and different UI paradigms, like SwiftUI or UIKit, with or without storyboards. They can also include databases and control-specific hardware sensors, like Face ID and TouchID if desired.

XCode is equipped with all the tools you need to create an app. This includes:

Setting up SwiftUI

Before you can download and install XCode, you must enroll in the Apple Developer Program, with a free or paid account. You must do this if you want to distribute your apps through the App Store.

You will find the links you need in the additional resources section of this lesson.

If you want to know more about installing XCode, please review the video Setting up the environment in Module 1, Lesson 1 of the course Create the user interface with SwiftUI . Once XCode is installed, the following steps can be taken to create a new project for SwiftUI:

  1. Using XCode, select File > New > Project, to start a new blank project.

  2. In the window that appears, select iOS, followed by the App option in the Application panel. Then, click Next .

  3. In the next window, choose a Product Name for the new app, select an Organization Identifier , select the option SwiftUI for the Interface , Swift for the Language , and the option Use Core Data if you intend to work with databases, and click Next . In the example below, the product name is MyApp and myCompany for the Organization Identifier .

The next window will ask where to save your new project. It also contains an option named Create Git Repository on my Mac , which you may turn on or not. Then, click Create .

You are now ready to start creating your app in SwiftUI.

Conclusion

In this reading, you’ve recapped how to download and install XCode as well as to how to use XCode to start a new project where you can start developing your amazing app in SwiftUI.